/*
* socket handeler class
* @params const io = socketio(server)
* */
module.exports = class SocketHandler {
    constructor(io) {
        this.io = io;
        this.io.on('connection', (socket) => {
            const data = {
                socketId: socket.id
            }
            socket.emit('connected', data);
            socket.on('sendPrivateMsg', (data) => {
                /**
                 * 使用redis作为缓存件保存已登录的用户socketid
                 * 将用户的userid与socket关联
                 */
            })
        })
    }
}